<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:useBean id="friend_delete1" scope="session" class="software.Fri_done"/>
<jsp:useBean id="friend_delete2" scope="session" class="software.Mes_function"/>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'friend_message_delete.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  <%
    if(session.getAttribute("Namesel")==null){
    out.print("<script>alert('你还未登陆！请登录');</script>");
  %>
  	<script type="text/javascript">
        window.location.href="index.jsp";    
   </script>
	 <%
   		 }
    	else{
    		String Id=session.getAttribute("IDsel").toString();
 		 	int Id1=Integer.parseInt(Id); 
 		 	int Id2 = Integer.parseInt(request.getParameter("messageId"));
    	 	friend_delete2.Mes_function_delete(Id2);
    	 	response.sendRedirect("selhome_message.jsp");		
    	}	
     %>
  <body>
    <span id = sel></span><a href=javascript:countDown></a>
     <script>
     function countDown(secs){
     sel.innerText=secs;
     if(--secs>0)
     setTimeout("countDown("+secs+")",1000);
     }
     countDown(0);
     </script>
     
  </body>
</html>
